﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Mono.Cecil;

namespace CoreEx.Common.Extensions
{
    public static class ModuleDefinitionExtensions
    {
        public static MethodReference ImportStaticMethod(this ModuleDefinition module, string methodName, Type declaringType)
        {
            return module.Import(declaringType.GetMethod(methodName, BindingFlags.Public | BindingFlags.Static));
        }
    }
}
